/*
 * @Title: 活动-团购宾馆详情
 * @Created by: ycq
 */
<template>
	<view :class="showXc||showChooseType||showRoom||showKnowMore||showUnuse||showFx?'hotel':''">
		<!-- 头部 -->
		<view class="hotel-body" >
			<comHeader :config="navConfig"/>
			<view class="header">
				<image class="header-bg" src="/static/banner.png" mode=""></image>
				<view class="play"></view>
				<view class="p-num" @click="play">
					<image src="/static/tupian.png" mode="aspectFit"></image>
					<text>10</text>
				</view>
				<view class="p-num" style="top: 188upx;">
					<image class="VR-img" src="/static/360VR.png" mode="aspectFit"></image>
				</view>
				<!-- <image src="/static/fanhui.png" class="back" @click="back"></image> -->
				<view class="header-bottom"></view>
			</view>
			
			<view class="hotel-info">
				<text class="name">龙芯昂国际酒店</text>
				<view class="pl">
					<text>1562条热门评论</text>
				</view>
				
				<view class="hotel-info-btn">
					<image v-if="!isFenxiang" src="/static/fenxiang.png" @click="togglePopup('bottom','share')" mode=""></image>
					<image v-if="isFenxiang" src="/static/fenxiang-1.png" @click="togglePopup('bottom','share')" mode=""></image>
					<image v-if="!isShoucang" @click="coll()" src="/static/shoucang.png" mode=""></image>
					<image v-if="isShoucang" src="/static/shoucang-1.png" mode=""></image>
					<image v-if="!isAdd" src="/static/add.png" mode="" @click="toDate()"></image>
					<image v-if="isAdd" src="/static/add-1.png" mode="" @click="toDate()"></image>
					<image class="xingcheng" src="/static/xingcheng.png" mode="" @click="toDate()"></image>
				</view>
				<view class="hd-price">
					<text class="hd-price-m">￥<text class="hd-price-num">999</text></text>
					<view class="begin">立即抢购</view>
					<text class="sall">已售21</text>
				</view>
				<view class="info-box">
					<view class="address">
						<view class="address-info">
							<image src="/static/pos-blue.png" mode=""></image>
							<text class="city">沈阳市沈河区</text>
							<text class="way">乘坐198支线到仙人洞镇，步行650米</text>
						</view>
					</view>
					<view class="map">
						<text>地图</text>
						<image src="/static/jiantou.png" mode=""></image>
					</view>
				</view>
				<view class="info-box">
					<view class="address">
						<view class="address-info">
							<image src="/static/pos-blue.png" mode=""></image>
							<text class="use-date">有效期至2019-09-21</text>
						</view>
					</view>
					<view class="unuse-date" @click="showUnUseBox()">
						<text>查看不可用日期</text>
						<image :style="showUnuse?'transform:rotate(270deg)':''" src="/static/jiantou.png" mode=""></image>
					</view>
					<view class="unuse-box" v-if="showUnuse">
						<text>不适应日期： 节假日不适用</text>
					</view>
				</view>
				<view class="info-box">
					<view class="list-title" style="margin-left: 0">
						<text class='shu'></text>
						<text>团购包含</text>
					</view>
					<view class="unuse-box">
						<text>爱情屋高级双人床</text><br>
						<text>含早餐、晚餐</text>
					</view>
				</view>
				<view class="info-box">
					<view class="list-title" style="margin-left: 0">
						<text class='shu'></text>
						<text>购买须知</text>
					</view>
					<view class="unuse-box" style="padding-left: 0;">
						<view class="unuse-area">
							<!-- 10/30 ljz改 -->
							<view class="displ">
								<view>预约信息：</view>
								<view>请提前预约</view>
							</view>
							<view class="displ">
								<view>联系电话：</view>
								<view>024-151515</view>
							</view>
							<view class="displ">
								<view>预约时间：</view>
								<view>09:00 - 17:00</view>
							</view>
							<view class="displ">
								<view>使用有效期：</view>
								<view>2019-03-21至2019-7-21</view>
							</view>
							<!-- end -->
							<!-- <text class="know-label">预约信息：</text><text>请提前预约；</text><br>
							<text class="know-label"></text><text>联系电话：</text><text>024-151515</text><br>
							<text class="know-label"></text><text>预约时间：</text><text>09:00 - 17:00</text><br>
							<text class="know-label">使用有效期：</text><text>2019-03-21至2019-7-21</text> -->
						</view>
						<view class="unuse-area" v-if="showKnowMore">
							<view class="displ">
								<view>使用人数：</view>
								<view>2人</view>
							</view>
							<!-- <text class="know-label">使用人数：</text><text>2人</text> -->
						</view>
						<view class="know-more" @click="showKnowMore=!showKnowMore">
							<text>查看全部</text>
							<image :style="showKnowMore?'transform:rotate(270deg)':''" src="/static/jiantou.png" mode=""></image>
						</view>
					</view>
				</view>
				
				
			</view>
			<view class="room-list">
				<view class="list-title" style="margin-left: 0;">
					<text class='shu'></text>
					<text>房间预订</text>
				</view>
				<view class="room-item" v-for="(item,index) in roomData"  :key='index'>
					<image :src="item.img" @click="showRoomDetail"></image>
					<view class="item-right">
						<view class="item-title"  @click="showRoomDetail">
							<text class="title-text">{{item.name}}</text>
							<image src="/static/jiantou.png" mode=""></image>
						</view>
						<text class="tip">{{item.tip}}</text>
						<view class="hd-list" >
							<view class="hd-item">
								<text>距离该商户{{item.far}}</text>
							</view>
						</view>
						<text class="price">￥{{item.prize}}</text>
						<view class="buy" @click="toOrder">立即预定</view>
					</view>
				</view>
			</view>
			<!-- 评论 -->
			<Comment :itemHandle='toEvaluationDetail' :itemHandle2='toEvaluation1' /> 
			<view class="down-more">
				<image src="/static/d-down.png" mode=""></image>
				<text>下拉查看更多</text>
			</view>
			<view style="height: 19vw;"></view>
		</view>
		<!-- <RoomDetail v-if='showRoom'  ></RoomDetail> -->
		<FootMenu />
		<Collection v-if='showColl' />
		<xing-cheng v-if='showXc'/>
		<xingcheng-type v-if='this.$store.state.showXcType' :config='typeConfig'></xingcheng-type>
		<!-- 分享弹窗 -->
		<uni-popup ref="share" :type="type" :custom="true">
			<view class="uni-share">
				<view class="uni-share-title">分享到</view>
				<view class="uni-share-content">
					<view v-for="(item, index) in bottomData" :key="index" class="uni-share-content-box">
						<view class="uni-share-content-image">
							<image :src="item.icon" class="image" />
						</view>
						<view class="uni-share-content-text">{{ item.text }}</view>
					</view>
				</view>
				<view class="uni-share-btn"  @click="cancel('share')">取消分享</view>
			</view>
		</uni-popup>
		<top-view></top-view>
	</view>
</template>

<script>
	import Comment from '@/components/Comment.vue'
	import RoomDetail from '@/components/RoomDetail.vue'
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	export default{
		data(){
			return{
				showColl:false,
				typeConfig:{
					typeId:2
				},
				navConfig:{
					isFixed:false,
					comScroll:200,
					left:{
						text:'',
						isShowLeft:true,
						leftGobackColor:'#ffffff',
						leftTextColor:'',
					},
					mid:{
						isShowMid:false,
						text:''
					},
					right:{
						text:'',
						isShowRight:false,
					}
				},
				isFenxiang:true,
				isShoucang:false,
				showXc:false,
				showChooseType:false,
				type: '',//uniPopup组件类型
				showRoom:false,
				showKnowMore:false,
				showUnuse:false,
				showFx:false,
				isAdd:false,
				bottomData: [
					{
						text: '微信',
						icon: '/static/audio/fx-wx.png',
						name: 'wx'
					},
					{
						text: '朋友圈',
						icon: '/static/audio/fx-friend.png',
						name: 'pyq'
					},
					{
						text: 'QQ',
						icon: '/static/audio/fx-qq.png',
						name: 'qq'
					},
					{
						text: 'QQ空间',
						icon: '/static/audio/fx-qqzone.png',
						name: 'qqkj'
					}
					
				],
				roomData:[
					{
						name:'沈阳金际酒店',
						far:'1.3km',
						tip:'大床1.8m | 全房间WiFi | 无餐食 | ',
						prize:298,
						img:'/static/banner.png',
						
					},
					{
						name:'沈阳国兴大酒店',
						far:'2.1km',
						tip:'大床1.8m | 全房间WiFi | 无餐食 | ',
						prize:268,
						img:'/static/banner.png',
						
					},
					{
						name:'锦江之星',
						far:'1.8km',
						tip:'大床1.8m | 全房间WiFi | 无餐食 | ',
						prize:298,
						img:'/static/banner.png',
						
					},
				],
				hdData:[
					{
						name:'入住立减',
						url:''
					},
					{
						name:'---优惠',
						url:''
					}
				]
			}
		},
		methods:{
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			play(){
				uni.navigateTo({
					url:'/pages/home/hotel/photo'
				})
			},
			showRoomDetail(){
				this.showRoom = true
				//#ifndef APP-PLUS|| MP-WEIXIN
				// document.body.style.overflow='hidden';
				//#endif
				
			},
			closeRoom(){
				//#ifndef APP-PLUS|| MP-WEIXIN
				document.body.style.overflow='';
				//#endif
				
				this.showRoom = false
			},
			toDate(){
				uni.navigateTo({
					url:'/pages/home/hotel/hotelDate'
				})
			},
			togglePopup(type,open){
				this.type = type;
				this.$refs[open].open()
				this.showFx = true
				document.body.style.overflow = 'hidden'
			},
			cancel(type) {
				this.$refs[type].close()
				this.showFx = false
			},
			toOrder(){
				uni.navigateTo({
					url:'order'
				})
			},
			
			coll(){
				this.showColl=true
				document.body.style.overflow = 'hidden'
			},
			closeColl(){
				this.showColl=false
				document.body.style.overflow = 'scroll'
			},
			closeXc(){
				this.showXc=false
				document.body.style.overflow = 'scroll'
			},
			addXcType(){
				this.showChooseType=true
				document.body.style.overflow = 'hidden'
			},
			closeXcType(){
				this.showChooseType=false
				this.$store.commit('showXcTypeUpdate',false)
				document.body.style.overflow = 'scroll'
			},
			showUnUseBox(){
				this.showUnuse = !this.showUnuse
			},
			toEvaluation1(){
				uni.navigateTo({
					url:'/pages/common/evaluation'
				})
			},
			toEvaluationDetail(){
				uni.navigateTo({
					url:'/pages/common/evaluationDetail'
				})
			},
		},
		components:{
			Comment,
			uniPopup,
			RoomDetail
		}
	}
</script>

<style scoped>
	.hotel{
		width: 100%;
		height: 100vh;
		overflow: scroll;
		position: relative;
	}
	.hotel-body{
		position: absolute;
		width: 100%;
		height: 100vh;
		}
	.header{
		width: 750upx;
		height: 575upx;
		position: relative;
	}
	.header-bg{
		width: 750upx;
		height: 575upx;
		position: absolute;
	}
	.back{
		width: 30upx;
		height: 36upx;
		top: 60upx;
		left: 26upx;
		position: absolute;
	}
	.play{
		position: absolute;
		top:295upx;
		left:342upx;
		width:0;
		height:0;
		border-top:35.5upx solid transparent;
		border-bottom:35.5upx solid transparent;
		border-left:63upx solid #FFFFFF;
	}
	.p-num{
		width: 125upx;
		height: 48upx;
		top: 103upx;
		right: 0;
		position: absolute;
		background: rgba(0,0,0,0.5);
		border-radius: 30upx 0 0 30upx;
		position: absolute;
	}
	.p-num image{
		width: 26upx;
		height: 26upx;
		margin-left:36upx;
		margin-top: 12upx;
		float: left;
	}
	.VR-img{
		width: 92upx !important;
		height: 32upx !important;
		margin-left:20upx !important;
		margin-top: 8upx !important;
	}
	.p-num text{
		color: #FFFFFF;
		font-size: 24upx;
		line-height: 48upx;
		float: left;
		margin-left: 16upx;
	}
	.header-bottom{
		width: 750upx;
		height: 30upx;
		bottom: 0upx;
		border-radius: 30upx 30upx 0 0;
		background: #FFFFFF;
		position: absolute;
	}
	.hotel-info{
		width: 750upx;
		height: auto;
		background: #FFFFFF;
	}
	.name{
		font-size: 36upx;
		margin-left: 37upx;
		height: 30upx;
		float: left;
		font-weight: bold;
		margin-right: 0;
	}
	.pl{
		float: left;
		width: 200upx;
		height: 30upx;
		margin-left: 20upx;
	}
	.pl text{
		font-size: 24upx;
		color: #999999;
	}
	.hd-price{
		width:750upx;
		height:70upx;
		padding-top: 30upx;
	}
	.hd-price-m{
		font-size: 26upx;
		color: #559CFF;
		float: left;
		margin-left: 76upx;
	}
	.hd-price-num{
		font-size: 50upx;
	}
	.sall{
		font-size: 26upx;
		margin-top: 10upx;
		margin-right: 20upx;
		color: #999999;
		float: right;
	}
	.info-box{
		width: 700upx;
		height: auto;
		display: table;
		padding-bottom: 40upx;
		margin-left: 25upx;
		border-bottom: #DCDCDC solid 1upx;
	}
	.hotel-info-btn{
		width: 300upx;
		height: 37upx;
		padding-top: 80upx;
		margin-left: 37upx;
		
	}
	.hotel-info-btn image{
		width: 35upx;
		height: 35upx;
		margin-right: 30upx;
		float: left;
	}
	.xingcheng{
		width: 54upx !important;
		height: 28upx !important;
		margin-top: -10upx;
		margin-left: -15upx;
	}
	.address{
		margin-top: 30upx;
		
		width: 450upx;
		height: auto;
		display: table;
		float: left;
	}
	.address-info{
		width: 450upx;
		height: auto;
		float: left;
	}
	.address-info image{
		float: left;
		width: 26upx;
		margin-top: 10upx;
		height: 30upx;
	}
	.city{
		float: left;
		font-size: 28upx;
		height: 30upx;
		font-weight: bold;
		margin-left: 20upx;
	}
	.way{
		width: 450upx;
		display: block;
		margin-top: 60upx;
		font-size: 24upx;
		color: #888888;
	}
	.map{
		width: 150upx;
		height: 60upx;
		float: right;
		margin-top: 30upx;
		text-align: right;
	}
	.map text{
		font-size: 26upx;
		color: #559CFF;
		margin-right: 20upx;
	}
	.map image{
		width: 20upx;
		height: 20upx;
	}
	.use-date{
		font-size: 30upx;	
		float: left;
		display: block;
		margin-top: 4upx;
		margin-left:24upx;
		color: #666666;
	}
	.unuse-date{
		width: 250upx;
		height: 60upx;
		float: right;
		margin-top: 30upx;
		text-align: right;
	}
	.unuse-date text{
		color: #559CFF;
		font-size: 26upx;
		margin-right: 20upx;
	}
	.unuse-date image{
		width: 20upx;
		height: 20upx;
		transform: rotate(90deg);
	}
	.unuse-box{
		width: 100%;
		height: auto;
		display: table;
		padding: 10upx 0upx;
	}
	.unuse-box text{
		font-size: 26upx;
		height: 50upx;
		
		color: #666666;
		float: left;
	}
	.unuse-area{
		width: 100%;
		height: auto;
		display: table;
	}
	.know-label{
		display: block;
		width: 200upx;
		
		text-align: right;
	}
	.know-more{
		width: 700upx;
		height: 60upx;
		display: flex;
		margin-top: 20upx;
		flex-direction: row;
		justify-content: center;
	}
	.know-more text{
		color: #559CFF;
		margin-right: 20upx;
	}
	.know-more image{
		width: 30upx;
		height: 30upx;
		margin-top: 2upx;
		transform: rotate(90deg);
	}
	.pl-num{
		font-size: 24upx;
		color: #888888;
		margin-left: 40upx;
	}
	.begin{
		width: 202upx;
		height: 60upx;
		background: -webkit-linear-gradient(left, #54B1FF,#5873FF);
		/* Safari 5.1 - 6.0 */
		background: -o-linear-gradient(right, #54B1FF,#5873FF);
		/* Opera 11.1 - 12.0 */
		background: -moz-linear-gradient(right, #54B1FF,#5873FF);
		/* Firefox 3.6 - 15 */
		background: linear-gradient(to right, #54B1FF,#5873FF);
		/* 标准的语法 */
		float: right;
		border-radius: 30upx;
		font-size: 28upx;
		border: none;
		
		line-height: 60upx;
		margin-right: 24upx;
		text-align: center;
		color: #FFFFFF;
	}
	
	.list-title{
		width: 93.4%;
		margin-left: auto;
		margin-right: auto;
		height: 58.4upx;
		margin-top:20upx;
	}
	.list-title text{
		font-size: 30upx;
		font-weight: bolder;
	}
	.shu{
		width: 0.7%;
		height: 3.06vw;
		background: #55A0FF;
		float: left;
		margin-top: 2.3vw;
		margin-right: 10px;
	}
	.des{
		width: 700upx;
		padding-left: 25upx;
		padding-right: 25upx;
		display: block;
		text-align:justify;
		text-indent:56upx;
		height: auto;
		font-size: 28upx;
		color: #888888;
	}
	.hd{
		width: 700upx;
		padding-left: 25upx;
		padding-right: 25upx;
		height: 42upx;
		margin-top: 30upx;
	}
	.hd image{
		width: 38upx;
		height: 42upx;
		float: left;
	}
	.hd text{
		margin-left: 20upx;
		font-size: 24upx;
		height: 42upx;
		display: block;
		float: left;
		line-height: 42upx;
		font-weight: bold;
	}
	/* 房间预定 */
	.room-list{
		width: 710upx;
		margin-left: auto;
		margin-right: auto;
		margin-top: 80upx;
	}
	.room-item{
		width: 710upx;
		height: 182upx;
		margin-top: 40upx;
		
	}
	.room-item image{
		margin: 10upx  10upx 0upx 10upx;
		width: 239upx;
		height: 172upx;
		float: left;
		border-radius: 10upx;
	}
	.item-right{
		width: 430upx;
		height: 182upx;
		float: right;
	}
	.item-title{
		width: 100%;
		margin-top: 5upx;
		height: 50upx;
	}
	.title-text{
		font-size: 32upx;
		float: left;
	}
	
	.item-title image{
		width: 20upx;
		height: 23upx;
		float: right;
		font-size: 21upx;
		color: #666666;
	}
	.far{
		width: 100%;
		display: block;
		font-size: 25upx;
		color: #666666;
	}
	.tip{
		width: 100%;
		display: block;
		margin-top: 5upx;
		font-size: 25upx;
		color: #666666;
	}
	.hd-list{
		width: 100%;
		height: 25upx;
		display: flex;
		flex-direction: row;
		margin-top: 10upx;
	}
	.hd-item{
		
		height: 30upx;
		margin-right: 15upx;
		color: #FE5706;
		line-height: 30upx;
		font-size: 20upx;
	}
	.price{
		font-size: 32upx;
		color: #DD540A;
		margin-top: 15upx;
		float: left;
	}
	.buy{
		width: 127upx;
		height: 40upx;
		margin-top: 15upx;
		color: #FFFFFF;
		font-size: 22upx;
		text-align: center;
		padding-left: 0;
		padding-right: 0;
		line-height: 40upx;
		border-radius: 20upx;
		border: none;
		white-space: nowrap;  /*强制span不换行*/
		float: right;
		background: -webkit-linear-gradient(left, #54B0FF,#5773FE);
		/* Safari 5.1 - 6.0 */
		background: -o-linear-gradient(right, #54B0FF,#5773FE);
		/* Opera 11.1 - 12.0 */
		background: -moz-linear-gradient(right, #54B0FF,#5773FE);
		/* Firefox 3.6 - 15 */
		background: linear-gradient(to right, #54B0FF,#5773FE);
		/* 标准的语法 */
	}
	.quxiao{
		font-size: 28upx;
		color: #000000;
		margin-top: 20upx;
		float: left;
	}
	/* 热门评论 */
	.down-more{
		width: 750upx;
		height: 30upx;
		text-align: center;
		display: flex;
		flex-direction: row;
		justify-content:center;
		margin-top: 50upx;
	}
	.down-more image{
		width: 24px;
		height: 20px;
		margin-right: 30upx;
		
		/* padding-top: 30upx; */
		
	}
	.down-more text{
		
		font-size: 34upx;
		line-height: 35upx;
		color: #D3D2D2;
	}
	.displ{
		display: flex;
		font-size: 13px;
		color: #666666;
		line-height: 50upx;
	}
	/* 底部分享 */
	.uni-share {
		background: #fff;
	}
	
	.uni-share-title {
		line-height: 60upx;
		font-size: 24upx;
		padding: 15upx 0;
		text-align: center;
	}
	
	.uni-share-content {
		display: flex;
		flex-wrap: wrap;
		padding: 15px;
	}
	
	.uni-share-content-box {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 25%;
		box-sizing: border-box;
	}
	
	.uni-share-content-image {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 60upx;
		height: 60upx;
		overflow: hidden;
		border-radius: 10upx;
	}
	
	.uni-share-content-image .image {
		width: 100%;
		height: 100%;
	}
	
	.uni-share-content-text {
		font-size: 26upx;
		color: #333;
		padding-top: 5px;
		padding-bottom: 10px;
	}
	
	.uni-share-btn {
		height: 90upx;
		line-height: 90upx;
		border-top: 1px #f5f5f5 solid;
		text-align: center;
		font-size: 30upx;
		color: #666;
	}
</style>
